package yangsw87.basic;

public class J10_Ex75_OOPb {

	public static void main(String[] args) {

		Stock st = new Stock();

		st.setSname("\"경영기술\"");
		st.setPreviousClosingPrice(100);
		st.setCurrentPrice(75);

		System.out.println(st.toString());

	}

}

class Stock {
	private String sname;
	private int previousClosingPrice;
	private int currentPrice;

	public void setSname(String sname) {
		this.sname = sname;
	}

	public void setPreviousClosingPrice(int previousClosingPrice) {
		this.previousClosingPrice = previousClosingPrice;
	}

	public void setCurrentPrice(int currentprice) {
		this.currentPrice = currentprice;
	}

	// setter

	public String getSname() {
		return sname;
	}

	public int getPreviousClosinPrice() {
		return previousClosingPrice;
	}

	public int getCurrentprice() {
		return currentPrice;
	}

	// getter

	@Override
	public String toString() {
		String result = "";
		result = result + "종목명 : " + sname + "\n";
		result += "종가 : " + previousClosingPrice + "만원" + "\n";
		result += "현재가 : " + currentPrice + "만원";

		return result;
	}
}